import axios from '@/libs/request'

export const insert = (data) => {
  return axios.request({
    url: '/api/ac/cme2/materialsProduceService/insert',
    data: data,
    type: 'post'
  })
}

export const findPageList = (pageInfo) => {
  return axios.request({
    url: '/api/as/cme2/materialsproduce/findPageList',
    data: pageInfo,
    type: 'get'
  })
}
export const deleteRequest = (data) => {
  return axios.request({
    url: '/api/ac/cme2/materialsProduceService/delete',
    data: data,
    type: 'post'
  })
}
export const updateDeptCommitStatus = (data) => {
  return axios.request({
    url: '/api/ac/cme2/materialsProduceService/updateDeptCommitStatus',
    data: data,
    type: 'post'
  })
}
export const updateDeptRejectStatus = (data) => {
  return axios.request({
    url: '/api/ac/cme2/materialsProduceService/updateDeptRejectStatus',
    data: data,
    type: 'post'
  })
}
export const findList = (data) => {
  return axios.request({
    url: '/api/as/cme2/materialsproduce/findList',
    data: data,
    type: 'get'
  })
}
export const update = (data) => {
  return axios.request({
    url: '/api/as/cme2/materialsproduce/update',
    data: data,
    type: 'post'
  })
}
export const updateDeptAuditStatus = (data) => {
  return axios.request({
    url: '/api/ac/cme2/materialsProduceService/updateDeptAuditStatus',
    data: data,
    type: 'post'
  })
}
export const updateLeaderAuditStatus = (data) => {
  return axios.request({
    url: '/api/ac/cme2/materialsProduceService/updateLeaderAuditStatus',
    data: data,
    type: 'post'
  })
}
export const getTypeList = () => {
  return axios.request({
    url: '/api/as/sc/dict/getDictInfoList?type=production_type',
    type: 'get'
  })
}
